# Redis配置
REDIS_CONFIG = {
    'host': 'localhost',
    'port': 6379,
    'db': 0,
    'decode_responses': True
}

# MySQL配置
MYSQL_CONFIG = {
    'host': 'localhost',
    'user': 'news',
    'password': 'ti4GZDxfTL4CKrnm',
    'database': 'news'
}

# 爬虫间隔时间（分钟）
CRAWL_INTERVAL = 30

# 新闻源配置
NEWS_SOURCES = [
    {
        'name': 'mohrss_news',
        'table_name': 'news_mohrss',
        'url': 'https://www.mohrss.gov.cn/SYrlzyhshbzb/dongtaixinwen/dfdt',
        'crawler_module': 'mohrss_crawler',
        'crawler_class': 'MohrssNewsCrawler',
        'interval': 120  # 30分钟
    },
    {
        'name': 'mohrss_jiuye',
        'table_name': 'news_mohrss_jiuye',
        'url': 'https://www.mohrss.gov.cn/SYrlzyhshbzb/jiuye/gzdt',
        'crawler_module': 'mohrss_jiuye_crawler',
        'crawler_class': 'JiuyeNewsCrawler',
        'interval': 120  # 60分钟
    },
    {
        'name': 'mohrss_laodongguanxi',
        'table_name': 'news_mohrss_laodongguanxi',
        'url': 'https://www.mohrss.gov.cn/SYrlzyhshbzb/laodongguanxi_/gzdt',
        'crawler_module': 'mohrss_laodongguanxi_crawler',
        'crawler_class': 'MohrssLaodongguanxiCrawler',
        'interval': 120  # 60分钟
    },
    {
        'name': 'mohrss_shehuibaozhang',
        'table_name': 'news_mohrss_shehuibaozhang',
        'url': 'https://www.mohrss.gov.cn/SYrlzyhshbzb/shehuibaozhang/gzdt',
        'crawler_module': 'mohrss_shehuibaozhang_crawler',
        'crawler_class': 'MohrssShehuibaozhangCrawler',
        'interval': 120  # 60分钟
    },
    {
        'name': 'mohrss_rencairenshi',
        'table_name': 'news_mohrss_rencairenshi',
        'url': 'https://www.mohrss.gov.cn/SYrlzyhshbzb/rencairenshi/gzdt',
        'crawler_module': 'mohrss_rencairenshi_crawler',
        'crawler_class': 'MohrssRencairenshiCrawler',
        'interval': 120  # 60分钟
    },
    {
        'name': 'moe_dfgzdt',
        'table_name': 'moe_dfgzdt_news',
        'url': 'http://www.moe.gov.cn/jyb_xwfb/s6192/s222/',
        'crawler_module': 'moe_dfgzdt_crawler',
        'crawler_class': 'MoeDfgzdtCrawler',
        'interval': 120  # 2小时
    },
    {
        'name': 'beijing_yaowen',
        'table_name': 'news_beijing_yaowen',
        'url': 'https://www.beijing.gov.cn/ywdt/yaowen',
        'crawler_module': 'beijing_yaowen_crawler',
        'crawler_class': 'BeijingYaowenCrawler',
        'interval': 30  # 30分钟更新一次
    },
    {
        'name': 'beijing_gongzuodongtai',
        'table_name': 'news_beijing_gongzuodongtai',
        'url': 'https://www.beijing.gov.cn/ywdt/gzdt',
        'crawler_module': 'beijing_gongzuodongtai_crawler',
        'crawler_class': 'BeijingGongzuodongtaiCrawler',
        'interval': 30  # 30分钟更新一次
    },
    {
        'name': 'beijing_gequredian',
        'table_name': 'news_beijing_gequredian',
        'url': 'https://www.beijing.gov.cn/ywdt/gqrd',
        'crawler_module': 'beijing_gequredian_crawler',
        'crawler_class': 'BeijingGequredianCrawler',
        'interval': 30  # 30分钟更新一次
    }
] 